package com.kaikeba.bean;

import java.util.Objects;

/**
 * @Author: Gyx
 * @Date: 2021/2/18 22:27
 */
public class Student {
    private int studentId;
    private String studentNumber;
    private String studentName;
    private String studentClass;
    private int studentAge;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Student student = (Student) o;
        return studentId == student.studentId &&
                studentAge == student.studentAge &&
                Objects.equals(studentNumber, student.studentNumber) &&
                Objects.equals(studentName, student.studentName) &&
                Objects.equals(studentClass, student.studentClass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentId, studentNumber, studentName, studentClass, studentAge);
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentId=" + studentId +
                ", studentNumber='" + studentNumber + '\'' +
                ", studentName='" + studentName + '\'' +
                ", studentClass='" + studentClass + '\'' +
                ", studentAge=" + studentAge +
                '}';
    }

    public int getStudentId() {
        return studentId;
    }

    public void setStudentId(int studentId) {
        this.studentId = studentId;
    }

    public String getStudentNumber() {
        return studentNumber;
    }

    public void setStudentNumber(String studentNumber) {
        this.studentNumber = studentNumber;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getStudentClass() {
        return studentClass;
    }

    public void setStudentClass(String studentClass) {
        this.studentClass = studentClass;
    }

    public int getStudentAge() {
        return studentAge;
    }

    public void setStudentAge(int studentAge) {
        this.studentAge = studentAge;
    }

    public Student() {
    }

    public Student(int studentId, String studentNumber, String studentName, String studentClass, int studentAge) {
        this.studentId = studentId;
        this.studentNumber = studentNumber;
        this.studentName = studentName;
        this.studentClass = studentClass;
        this.studentAge = studentAge;
    }

    public Student(String studentNumber, String studentName, String studentClass, int studentAge) {
        this.studentNumber = studentNumber;
        this.studentName = studentName;
        this.studentClass = studentClass;
        this.studentAge = studentAge;
    }
}
